package org.jeecg.modules.demo.com.kunpeng.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.com.kunpeng.entity.Project;
import org.jeecg.modules.demo.com.kunpeng.entity.ProjectCostApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo.com.kunpeng.vo.ProjectCostApplyListQueryVO;
import org.springframework.stereotype.Repository;

/**
 * @Description: 项目费用申请表
 * @Author: jeecg-boot
 * @Date:   2022-12-15
 * @Version: V1.0
 */
@Repository
public interface ProjectCostApplyMapper extends BaseMapper<ProjectCostApply> {

    /**
     * 全局模糊查询
     * @param page
     * @param projectName
     * @param state
     * @param keyWords
     * @return
     */
    List<ProjectCostApplyListQueryVO> listByKeyWords(Page<ProjectCostApplyListQueryVO> page,@Param("projectName")String projectName,@Param("state")String state,
                                                     @Param("keyWords")String keyWords);

    /**
     * 根据项目id获取项目费用申请表数据
     * @param projectId
     * @return
     */
    List<ProjectCostApply> listByProjectId(String projectId);

    /**
     * 项目列表页面跳转
     * @param page
     * @param projectId
     * @return
     */
    List<ProjectCostApplyListQueryVO> listByPjId(Page<ProjectCostApplyListQueryVO> page,String projectId);


    /**
     * 根据id修改项目费用申请状态
     */
    int updateProjectCostApplyStatus(String id,String state);

    /**
     * 根据id修改项目费用申请是否删除状态
     * @param id
     * @return
     */
    int updateProjectCostApplyIsDeleteById(String id);

    /**
     * 根据id修改项目费用申请表数据
     */
    int updateProjectCostApplyById(ProjectCostApply projectCostApply);
}
